package com.hq.zb.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author huanghanrui
 * @since 2022-03-07
 */
@Data
@TableName("sys_role")
public class Role extends BaseModel<Role> {

    private static final long serialVersionUID = 1L;

    /**
     * 角色id
     */
    @TableId(value = "role_id", type = IdType.AUTO)
    private Integer roleId;
    /**
     * 角色名称
     */
    @TableField("role_name")
    private String roleName;
    /**
     * 描述
     */
    private String description;
    /**
     * 状态
     */
    @TableField("enable_flag")
    private Boolean enableFlag;

    /**
     * 组织
     */
    @TableField("org_code")
    private String orgCode;

    /**
     * 部门
     */
    @TableField("dept_code")
    private String deptCode;

    @Override
    protected Serializable pkVal() {
        return this.roleId;
    }
}
